#include "stdio.h"
#include "unistd.h"
#include "string.h"




#define NUM 101

int main() {
    char bar[NUM];
    memset(bar, 0, sizeof(bar));
    int i = 0;
    const char label[] = "|/-\\";
    while (i < NUM) {
        bar[i] = '#';
        printf("[%-100s][%d%%][%c]\r", bar, i, label[i % 4]);
        fflush(stdout);
        usleep(100000);
        i++;
        
    }
    return 0;
}
